package service.impl;

import service.IPaymentStrategy;

/**
 * 具体策略类：支付宝支付
 */
public class AlipayStrategy implements IPaymentStrategy {
    private final String account; // 支付宝账户

    public AlipayStrategy(String account) {
        this.account = account;
    }
    @Override
    public void pay(double amount) {
        // 模拟调用支付宝SDK的复杂逻辑
        System.out.printf("使用支付宝账户 [%s] 支付了 ￥%.2f 元。\n", account, amount);
    }
}
